package cn.app.dao.appinfo;

import cn.app.pojo.AppInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppinfoMapper {
    /**
     *   通过多条件获取app列表-模糊查询-appinfoList
     * @param querySoftwareName  软件名称
     * @param queryStatus  app状态
     * @param queryCategoryLevel1
     * @param queryCategoryLevel2
     * @param queryCategoryLevel3
     * @param queryFlatformId  所属平台id
     * @param devId  登录账户id
     * @param currentPageNo
     * @param pageSize
     * @return
     * @throws Exception
     */
    public  List<AppInfo>  getAppInfoList(@Param(value = "softwareName") String querySoftwareName,
                                          @Param(value = "status") Integer queryStatus,
                                          @Param(value = "categoryLevel1") Integer queryCategoryLevel1,
                                          @Param(value = "categoryLevel2") Integer queryCategoryLevel2,
                                          @Param(value = "categoryLevel3") Integer queryCategoryLevel3,
                                          @Param(value = "flatformId") Integer queryFlatformId,
                                          @Param(value = "devId") Integer devId,
                                          @Param(value = "from") Integer currentPageNo,
                                          @Param(value = "pageSize") Integer pageSize)throws Exception;

    /**
     *通过条件查询-appinfo表记录数
     * @param querySoftwareName
     * @param queryStatus
     * @param queryCategoryLevel1
     * @param queryCategoryLevel2
     * @param queryCategoryLevel3
     * @param queryFlatformId
     * @param devId
     * @return
     * @throws Exception
     */
    public int getAppInfoCount(@Param(value = "softwareName") String querySoftwareName,
                               @Param(value = "status") Integer queryStatus,
                               @Param(value = "categoryLevel1") Integer queryCategoryLevel1,
                               @Param(value = "categoryLevel2") Integer queryCategoryLevel2,
                               @Param(value = "categoryLevel3") Integer queryCategoryLevel3,
                               @Param(value = "flatformId") Integer queryFlatformId,
                               @Param(value = "devId") Integer devId)throws Exception;

    /**
     * 添加app信息
     * @param appInfo
     * @return
     * @throws Exception
     */
    public int add(AppInfo appInfo)throws  Exception;
}
